﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ExportToPLMX.CCoExportToPLMXCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using DnProcessSimulateCommands.ExportToPLMX.ViewModels;
using System.Windows;
using Tecnomatix.Engineering;
using Tecnomatix.Engineering.Ui;


namespace DnProcessSimulateCommands.ExportToPLMX;

public class CCoExportToPLMXCmd : TxButtonCommand
{
  private CCoExportToPLMXCmdEnabler m_enabler;

  public CCoExportToPLMXCmd() => this.m_enabler = new CCoExportToPLMXCmdEnabler();

  public virtual ITxCommandEnabler CommandEnabler => (ITxCommandEnabler) this.m_enabler;

  public virtual string Category
  {
    get => CCoExportToPLMXUtils.GetResourceManager().GetString("ETPX_CMD_CATEGORY");
  }

  public virtual string Name
  {
    get => CCoExportToPLMXUtils.GetResourceManager().GetString("ETPX_CMD_NAME");
  }

  public virtual string Description
  {
    get => CCoExportToPLMXUtils.GetResourceManager().GetString("ETPX_CMD_DESC");
  }

  public virtual string Tooltip
  {
    get => CCoExportToPLMXUtils.GetResourceManager().GetString("ETPX_CMD_TOOLTIP");
  }

  public virtual string Bitmap => "ExportToPLMX.Resources.export_plmx_16px.bmp";

  public virtual string MediumBitmap => "ExportToPLMX.Resources.export_plmx_24px.bmp";

  public virtual string LargeBitmap => "ExportToPLMX.Resources.export_plmx_32px.png";

  public virtual ITxImage Image => (ITxImage) TxImageManager.GetImageByKey("ExportToPlmx");

  public virtual void Execute(object cmdParams) => this.OpenExportToPLMXDialog();

  private void OpenExportToPLMXDialog()
  {
    CUiETPXShellView cuiEtpxShellView = new CUiETPXShellView(new CUiETPXShellViewModel());
    ((Window) cuiEtpxShellView).Show();
    ((UIElement) cuiEtpxShellView).InvalidateVisual();
  }
}
